#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QKeyEvent>
#include <QTcpSocket>
#include <QMessageBox>
#include <QPushButton>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    void keyPressEvent(QKeyEvent *event) override;
    void keyReleaseEvent(QKeyEvent *event) override;

    void closeWidget();

private slots:

    void handleRecv();

    void on_pushButton_6_clicked();

    void on_pushButton_7_clicked();

private:
    Ui::Widget *ui;
    QTcpSocket *socket = nullptr;
};
#endif // WIDGET_H
